#!/usr/bin/python -u
# -*- coding:Utf-8 -*-

#
# Infos
# args url outputFile

__author__  = "Chaoswizard"
__license__ = "GPL 2"
__version__ = "0.4"
__url__     = "http://code.google.com/p/tvdownloader/"

#
# Modules
#

import re
import sys

from PluzzDL        import PluzzDL

#
# Main
#

if( __name__ == "__main__" ) :
	
	url=sys.argv[1]
	#print 'url:' + url
	#print 'outputFile:'+outputFile
	#sys.exit(0)
	
	# Verification de l'URL
	if( re.match( "http://www.pluzz.fr/[^\.]+?\.html", url ) is None ):
		print( "L'URL \"%s\" n'est pas valide" %( url ) )
		sys.exit( -1 )
	
	
	# Telechargement de la video
	PluzzDL(url)
